package cn.tedu.controller;

import cn.tedu.pojo.Student;
import cn.tedu.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("student")
public class StudentController {
    @Autowired
    StudentService studentService;
    @RequestMapping("get")
    public Student get(Student student){
        studentService.get(student);
        return student;
    }
    @RequestMapping("add")
    public Student add(Student student){
        studentService.add(student);
        return student;
    }

}
